home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3998 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.4 KB

  1. Path: ix.netcom.com!netnews
  2. From: miker3@ix.netcom.com (Mike Rubenstein)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Q:order of evaluation
  5. Date: Sat, 27 Jan 1996 04:19:05 GMT
  6. Organization: Netcom
  7. Message-ID: <3109a71f.17721792@nntp.ix.netcom.com>
  8. References: <4ec59t$f3n@news.nstn.ca>
  9. NNTP-Posting-Host: ix-dc17-13.ix.netcom.com
  10. X-NETCOM-Date: Fri Jan 26  8:19:16 PM PST 1996
  11. X-Newsreader: Forte Agent .99c/16.141
  12.  
  13. nstn181a@fox.nstn.ca (Pierre G. Boutquin) wrote:
  14.  
  15. > In <4eb6kq$ksf@gazette.tandem.com>, yun_yeogirl writes:
  16. > >Michael M Rubenstein wrote :
  17. > >
  18. > >        [Example:
  19. > >          i = v[i++];      // the behavior is undefined
  20. > >          i = 7,i++,i++;   // `i' becomes 9
  21. > >
  22. > >          i = ++i + 1;     // the behavior is undefined
  23. > >          i = i + 1;       // the value of 'i' is incremented
  24. > >
  25. > >The first and third statement seem clear to me. I don't see why they are
  26. > >undefined. I guess you made a typo here. Maybe you meant :
  27. > >
  28. > >    i + v[i++] and i + (++i + 1).
  29. > >
  30. > >If I am wrong, please enlighten me.
  31. > You _are_ wrong.  They seem clear, but are undefined _by convention_.
  32. > i = v[i++]; is given in ARM as an example at the start of Chapt. 5.
  33.  
  34. Please try and get your quotes right.  None of this is mine.  Only the
  35. example is from my post and that I copied from the draft.
  36.  
  37. My post clearly (I hope) presented the same view that you espouse.
  38.  
  39.  
  40. Michael M Rubenstein
  41.